<template>
  <el-container>
    <el-header height="30%">
      <div style="border-radius: 4px;" class="page-container">
        <el-row :gutter="24">
          <el-col :span="8">
            <el-col :span="5">
              <div class="grid-content" style="text-align:right">
                <label>商家</label>
              </div>
            </el-col>
            <el-col :span="19">
              <div class="grid-content" style="text-align:left;width:100%">
                <el-input size="mini" readonly="readonly" value="张小二服饰" @focus="showShops"></el-input>
              </div>
            </el-col>
          </el-col>

          <el-col :span="8">
            <el-col :span="5">
              <div class="grid-content" style="text-align:right;">
                <label>店铺名称</label>
              </div>
            </el-col>
            <el-col :span="19">
              <div class="grid-content" style="text-align:left;width:100%">
                <el-input size="mini" readonly="readonly" value="选择店铺名称" @focus="showStore"></el-input>
              </div>
            </el-col>
          </el-col>

          <el-col :span="8">
            <el-col :span="5">
              <div class="grid-content" style="text-align:right">
                <label>收货仓库</label>
              </div>
            </el-col>
            <el-col :span="19">
              <div class="grid-content" style="text-align:left;width:100%">
                <el-input size="mini" readonly="readonly" @focus="showWarehouse" value="选择仓库"></el-input>
              </div>
            </el-col>
          </el-col>
        </el-row>

        <el-row :gutter="24">
          <el-col :span="8">
            <el-col :span="5">
              <div class="grid-content" style="text-align:right">
                <label>退货单号</label>
              </div>
            </el-col>
            <el-col :span="19">
              <div class="grid-content" style="text-align:left;width:100%">
                <el-input size="mini"></el-input>
              </div>
            </el-col>
          </el-col>

          <el-col :span="8">
            <el-col :span="5">
              <div class="grid-content" style="text-align:right;">
                <label>创建日期</label>
              </div>
            </el-col>
            <el-col :span="19">
              <div class="grid-content" style="text-align:left;">
                <el-date-picker
                  style="width:349px"
                  type="daterange"
                  range-separator="到"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期"
                  size="small"
                ></el-date-picker>
              </div>
            </el-col>
          </el-col>

          <el-col :span="8">
            <el-col :span="5">
              <div class="grid-content" style="text-align:right;">
                <label>审核日期</label>
              </div>
            </el-col>
            <el-col :span="19">
              <div class="grid-content" style="text-align:left;">
                <el-date-picker
                  style="width:349px"
                  type="daterange"
                  range-separator="到"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期"
                  size="small"
                ></el-date-picker>
              </div>
            </el-col>
          </el-col>
        </el-row>

        <el-row :gutter="24">
          <el-col :span="8">
            <el-col :span="5">
              <div class="grid-content" style="text-align:right">
                <label>收货单号</label>
              </div>
            </el-col>
            <el-col :span="19">
              <div class="grid-content" style="text-align:left;">
                <el-input size="mini"></el-input>
              </div>
            </el-col>
          </el-col>

          <el-col :span="8">
            <el-col :span="5">
              <div class="grid-content" style="text-align:right">
                <label>商品编码/条码</label>
              </div>
            </el-col>
            <el-col :span="19">
              <div class="grid-content" style="text-align:left;width:100%">
                <el-input size="mini"></el-input>
              </div>
            </el-col>
          </el-col>

          <el-col :span="8">
            <el-col :span="5">
              <div class="grid-content" style="text-align:right">
                <label>商品名称</label>
              </div>
            </el-col>
            <el-col :span="19">
              <div class="grid-content" style="text-align:left;width:100%">
                <el-input size="mini"></el-input>
              </div>
            </el-col>
          </el-col>
        </el-row>

        <el-row>
          <div style="text-align:right;margin-right:10px">
            <kt-button
              icon="fa fa-search"
              :label="$t('action.search')"
              type="primary"
              @click="findPage(null)"
            />
            <kt-button label="重置" type="primary" />
            <kt-button label="导出" type="primary" @click="exInfo" />
          </div>
        </el-row>
      </div>
    </el-header>
    <el-main>
      <div>
        <el-tabs>
          <div style="text-align:left">
            <kt-button label="创建退货单" type="primary" @click="addOrder" />
          </div>
          <el-tab-pane label="全部">
            <div>
              <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="checks" type="selection"></el-table-column>
                <el-table-column prop="mpCode" label="操作"></el-table-column>
                <el-table-column prop="mpCode" label="商家编码"></el-table-column>
                <el-table-column prop="mpName" label="商家名称"></el-table-column>
                <el-table-column prop="mpBarcode" label="店铺编码"></el-table-column>
                <el-table-column prop="mpMeasuret" label="店铺名称"></el-table-column>
                <el-table-column prop="shoptype" label="退货单号"></el-table-column>
                <el-table-column prop="shopBrand" label="供应商编码"></el-table-column>

                <el-table-column prop="purchasenums" label="* 供应商名称	"></el-table-column>
                <el-table-column prop="regularnums" label="交易币别"></el-table-column>
                <el-table-column prop="unregularnums" label="汇率"></el-table-column>
                <el-table-column prop="correctedquantity" label="未税金额"></el-table-column>
                <el-table-column prop="returnpurchase" label="税额"></el-table-column>
                <el-table-column prop="untaxed" label="含税金额"></el-table-column>
                <el-table-column prop="taxrate" label="单据状态		"></el-table-column>
                <el-table-column prop="moneytype" label="退货状态"></el-table-column>
                <el-table-column prop="exchangerate" label="开票状态"></el-table-column>
                <el-table-column prop="purchaseprice" label="下发WMS状态"></el-table-column>
                <el-table-column prop="untaxedamount" label="WMS回调状态"></el-table-column>
                <el-table-column prop="tax" label="收货单号"></el-table-column>
                <el-table-column prop="amounttax" label="操作人员"></el-table-column>
                <el-table-column prop="receiptmethod" label="创建日期"></el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
          <el-tab-pane label="待提交">
            <div>
              <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="checks" type="selection"></el-table-column>
                <el-table-column prop="mpCode" label="操作"></el-table-column>
                <el-table-column prop="mpCode" label="商家编码"></el-table-column>
                <el-table-column prop="mpName" label="商家名称"></el-table-column>
                <el-table-column prop="mpBarcode" label="店铺编码"></el-table-column>
                <el-table-column prop="mpMeasuret" label="店铺名称"></el-table-column>
                <el-table-column prop="shoptype" label="退货单号"></el-table-column>
                <el-table-column prop="shopBrand" label="供应商编码"></el-table-column>

                <el-table-column prop="purchasenums" label="* 供应商名称	"></el-table-column>
                <el-table-column prop="regularnums" label="交易币别"></el-table-column>
                <el-table-column prop="unregularnums" label="汇率"></el-table-column>
                <el-table-column prop="correctedquantity" label="未税金额"></el-table-column>
                <el-table-column prop="returnpurchase" label="税额"></el-table-column>
                <el-table-column prop="untaxed" label="含税金额"></el-table-column>
                <el-table-column prop="taxrate" label="单据状态		"></el-table-column>
                <el-table-column prop="moneytype" label="退货状态"></el-table-column>
                <el-table-column prop="exchangerate" label="开票状态"></el-table-column>
                <el-table-column prop="purchaseprice" label="下发WMS状态"></el-table-column>
                <el-table-column prop="untaxedamount" label="WMS回调状态"></el-table-column>
                <el-table-column prop="tax" label="收货单号"></el-table-column>
                <el-table-column prop="amounttax" label="操作人员"></el-table-column>
                <el-table-column prop="receiptmethod" label="创建日期"></el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
          <el-tab-pane label="待审核">
            <div>
              <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="checks" type="selection"></el-table-column>
                <el-table-column prop="mpCode" label="操作"></el-table-column>
                <el-table-column prop="mpCode" label="商家编码"></el-table-column>
                <el-table-column prop="mpName" label="商家名称"></el-table-column>
                <el-table-column prop="mpBarcode" label="店铺编码"></el-table-column>
                <el-table-column prop="mpMeasuret" label="店铺名称"></el-table-column>
                <el-table-column prop="shoptype" label="退货单号"></el-table-column>
                <el-table-column prop="shopBrand" label="供应商编码"></el-table-column>

                <el-table-column prop="purchasenums" label="* 供应商名称	"></el-table-column>
                <el-table-column prop="regularnums" label="交易币别"></el-table-column>
                <el-table-column prop="unregularnums" label="汇率"></el-table-column>
                <el-table-column prop="correctedquantity" label="未税金额"></el-table-column>
                <el-table-column prop="returnpurchase" label="税额"></el-table-column>
                <el-table-column prop="untaxed" label="含税金额"></el-table-column>
                <el-table-column prop="taxrate" label="单据状态		"></el-table-column>
                <el-table-column prop="moneytype" label="退货状态"></el-table-column>
                <el-table-column prop="exchangerate" label="开票状态"></el-table-column>
                <el-table-column prop="purchaseprice" label="下发WMS状态"></el-table-column>
                <el-table-column prop="untaxedamount" label="WMS回调状态"></el-table-column>
                <el-table-column prop="tax" label="收货单号"></el-table-column>
                <el-table-column prop="amounttax" label="操作人员"></el-table-column>
                <el-table-column prop="receiptmethod" label="创建日期"></el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
          <el-tab-pane label="已审核">
            <div>
              <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="checks" type="selection"></el-table-column>
                <el-table-column prop="mpCode" label="操作"></el-table-column>
                <el-table-column prop="mpCode" label="商家编码"></el-table-column>
                <el-table-column prop="mpName" label="商家名称"></el-table-column>
                <el-table-column prop="mpBarcode" label="店铺编码"></el-table-column>
                <el-table-column prop="mpMeasuret" label="店铺名称"></el-table-column>
                <el-table-column prop="shoptype" label="退货单号"></el-table-column>
                <el-table-column prop="shopBrand" label="供应商编码"></el-table-column>

                <el-table-column prop="purchasenums" label="* 供应商名称	"></el-table-column>
                <el-table-column prop="regularnums" label="交易币别"></el-table-column>
                <el-table-column prop="unregularnums" label="汇率"></el-table-column>
                <el-table-column prop="correctedquantity" label="未税金额"></el-table-column>
                <el-table-column prop="returnpurchase" label="税额"></el-table-column>
                <el-table-column prop="untaxed" label="含税金额"></el-table-column>
                <el-table-column prop="taxrate" label="单据状态		"></el-table-column>
                <el-table-column prop="moneytype" label="退货状态"></el-table-column>
                <el-table-column prop="exchangerate" label="开票状态"></el-table-column>
                <el-table-column prop="purchaseprice" label="下发WMS状态"></el-table-column>
                <el-table-column prop="untaxedamount" label="WMS回调状态"></el-table-column>
                <el-table-column prop="tax" label="收货单号"></el-table-column>
                <el-table-column prop="amounttax" label="操作人员"></el-table-column>
                <el-table-column prop="receiptmethod" label="创建日期"></el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
          <el-tab-pane label="审核拒绝">
            <div>
              <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="checks" type="selection"></el-table-column>
                <el-table-column prop="mpCode" label="操作"></el-table-column>
                <el-table-column prop="mpCode" label="商家编码"></el-table-column>
                <el-table-column prop="mpName" label="商家名称"></el-table-column>
                <el-table-column prop="mpBarcode" label="店铺编码"></el-table-column>
                <el-table-column prop="mpMeasuret" label="店铺名称"></el-table-column>
                <el-table-column prop="shoptype" label="退货单号"></el-table-column>
                <el-table-column prop="shopBrand" label="供应商编码"></el-table-column>

                <el-table-column prop="purchasenums" label="* 供应商名称	"></el-table-column>
                <el-table-column prop="regularnums" label="交易币别"></el-table-column>
                <el-table-column prop="unregularnums" label="汇率"></el-table-column>
                <el-table-column prop="correctedquantity" label="未税金额"></el-table-column>
                <el-table-column prop="returnpurchase" label="税额"></el-table-column>
                <el-table-column prop="untaxed" label="含税金额"></el-table-column>
                <el-table-column prop="taxrate" label="单据状态		"></el-table-column>
                <el-table-column prop="moneytype" label="退货状态"></el-table-column>
                <el-table-column prop="exchangerate" label="开票状态"></el-table-column>
                <el-table-column prop="purchaseprice" label="下发WMS状态"></el-table-column>
                <el-table-column prop="untaxedamount" label="WMS回调状态"></el-table-column>
                <el-table-column prop="tax" label="收货单号"></el-table-column>
                <el-table-column prop="amounttax" label="操作人员"></el-table-column>
                <el-table-column prop="receiptmethod" label="创建日期"></el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
          <el-tab-pane label="已结案">
            <div>
              <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="checks" type="selection"></el-table-column>
                <el-table-column prop="mpCode" label="操作"></el-table-column>
                <el-table-column prop="mpCode" label="商家编码"></el-table-column>
                <el-table-column prop="mpName" label="商家名称"></el-table-column>
                <el-table-column prop="mpBarcode" label="店铺编码"></el-table-column>
                <el-table-column prop="mpMeasuret" label="店铺名称"></el-table-column>
                <el-table-column prop="shoptype" label="退货单号"></el-table-column>
                <el-table-column prop="shopBrand" label="供应商编码"></el-table-column>

                <el-table-column prop="purchasenums" label="* 供应商名称	"></el-table-column>
                <el-table-column prop="regularnums" label="交易币别"></el-table-column>
                <el-table-column prop="unregularnums" label="汇率"></el-table-column>
                <el-table-column prop="correctedquantity" label="未税金额"></el-table-column>
                <el-table-column prop="returnpurchase" label="税额"></el-table-column>
                <el-table-column prop="untaxed" label="含税金额"></el-table-column>
                <el-table-column prop="taxrate" label="单据状态		"></el-table-column>
                <el-table-column prop="moneytype" label="退货状态"></el-table-column>
                <el-table-column prop="exchangerate" label="开票状态"></el-table-column>
                <el-table-column prop="purchaseprice" label="下发WMS状态"></el-table-column>
                <el-table-column prop="untaxedamount" label="WMS回调状态"></el-table-column>
                <el-table-column prop="tax" label="收货单号"></el-table-column>
                <el-table-column prop="amounttax" label="操作人员"></el-table-column>
                <el-table-column prop="receiptmethod" label="创建日期"></el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
          <el-tab-pane label="已完成">
            <div>
              <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="checks" type="selection"></el-table-column>
                <el-table-column prop="mpCode" label="操作"></el-table-column>
                <el-table-column prop="mpCode" label="商家编码"></el-table-column>
                <el-table-column prop="mpName" label="商家名称"></el-table-column>
                <el-table-column prop="mpBarcode" label="店铺编码"></el-table-column>
                <el-table-column prop="mpMeasuret" label="店铺名称"></el-table-column>
                <el-table-column prop="shoptype" label="退货单号"></el-table-column>
                <el-table-column prop="shopBrand" label="供应商编码"></el-table-column>

                <el-table-column prop="purchasenums" label="* 供应商名称	"></el-table-column>
                <el-table-column prop="regularnums" label="交易币别"></el-table-column>
                <el-table-column prop="unregularnums" label="汇率"></el-table-column>
                <el-table-column prop="correctedquantity" label="未税金额"></el-table-column>
                <el-table-column prop="returnpurchase" label="税额"></el-table-column>
                <el-table-column prop="untaxed" label="含税金额"></el-table-column>
                <el-table-column prop="taxrate" label="单据状态		"></el-table-column>
                <el-table-column prop="moneytype" label="退货状态"></el-table-column>
                <el-table-column prop="exchangerate" label="开票状态"></el-table-column>
                <el-table-column prop="purchaseprice" label="下发WMS状态"></el-table-column>
                <el-table-column prop="untaxedamount" label="WMS回调状态"></el-table-column>
                <el-table-column prop="tax" label="收货单号"></el-table-column>
                <el-table-column prop="amounttax" label="操作人员"></el-table-column>
                <el-table-column prop="receiptmethod" label="创建日期"></el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
          <el-tab-pane label="已过期    ">
            <div>
              <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="checks" type="selection"></el-table-column>
                <el-table-column prop="mpCode" label="操作"></el-table-column>
                <el-table-column prop="mpCode" label="商家编码"></el-table-column>
                <el-table-column prop="mpName" label="商家名称"></el-table-column>
                <el-table-column prop="mpBarcode" label="店铺编码"></el-table-column>
                <el-table-column prop="mpMeasuret" label="店铺名称"></el-table-column>
                <el-table-column prop="shoptype" label="退货单号"></el-table-column>
                <el-table-column prop="shopBrand" label="供应商编码"></el-table-column>

                <el-table-column prop="purchasenums" label="* 供应商名称	"></el-table-column>
                <el-table-column prop="regularnums" label="交易币别"></el-table-column>
                <el-table-column prop="unregularnums" label="汇率"></el-table-column>
                <el-table-column prop="correctedquantity" label="未税金额"></el-table-column>
                <el-table-column prop="returnpurchase" label="税额"></el-table-column>
                <el-table-column prop="untaxed" label="含税金额"></el-table-column>
                <el-table-column prop="taxrate" label="单据状态		"></el-table-column>
                <el-table-column prop="moneytype" label="退货状态"></el-table-column>
                <el-table-column prop="exchangerate" label="开票状态"></el-table-column>
                <el-table-column prop="purchaseprice" label="下发WMS状态"></el-table-column>
                <el-table-column prop="untaxedamount" label="WMS回调状态"></el-table-column>
                <el-table-column prop="tax" label="收货单号"></el-table-column>
                <el-table-column prop="amounttax" label="操作人员"></el-table-column>
                <el-table-column prop="receiptmethod" label="创建日期"></el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
        </el-tabs>
      </div>
    </el-main>
    <el-row style="text-align:center">
      <kt-button label="打印" type="primary" @click="print" />
    </el-row>

    <!-- 选择商家 -->
    <el-dialog
      title="选择商家"
      :visible.sync="shopsModel"
      width="45%"
      height="100%"
      label-width="80px"
      label-position="right"
    >
      <el-form style="text-align:left" label-width="80px" label-position="right">
        <el-row>
          <div style="text-align:center">
            <el-form-item label="商家编码" style="float:left;margin-left:90px">
              <el-input auto-complete="off" width="20%"></el-input>
            </el-form-item>

            <el-form-item label="商家名称" style="float:left;margin-left:90px">
              <el-input auto-complete="off" width="20%"></el-input>
            </el-form-item>
          </div>
        </el-row>

        <div style="text-align:center">
          <el-form-item>
            <kt-button
              icon="fa fa-search"
              :label="$t('action.search')"
              type="primary"
              @click="findPage(null)"
            />
            <kt-button label="重置" type="primary" />
          </el-form-item>
        </div>

        <el-table :data="shopTable" border style="width: 100%" :visible.sync="shopsTable">
          <el-table-column prop="number" label="商家编码"></el-table-column>
          <el-table-column prop="name" label="商家名称" width="280"></el-table-column>
          <el-table-column prop="type" label="商家类型"></el-table-column>
        </el-table>
      </el-form>
      <div slot="footer" class="dialog-footer" style="text-align:right">
        <el-button @click="cancels2">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 选择店铺 -->
    <el-dialog
      title="选择店铺"
      :visible.sync="showModel"
      width="45%"
      height="100%"
      label-width="80px"
      label-position="right"
    >
      <el-form style="text-align:left" label-width="80px" label-position="right">
        <el-row>
          <div style="text-align:center">
            <el-form-item label="店铺名称" style="float:left;margin-left:90px">
              <el-input auto-complete="off" width="20%"></el-input>
            </el-form-item>

            <el-form-item label="店铺编码" style="float:left;margin-left:90px">
              <el-input auto-complete="off" width="20%"></el-input>
            </el-form-item>
          </div>
        </el-row>

        <div style="text-align:center">
          <el-form-item>
            <kt-button
              icon="fa fa-search"
              :label="$t('action.search')"
              type="primary"
              @click="findPage(null)"
            />
            <kt-button label="重置" type="primary" />
          </el-form-item>
        </div>

        <el-table :data="shopTable" border style="width: 100%" :visible.sync="showTable">
          <el-table-column prop="checks" type="selection"></el-table-column>
          <el-table-column prop="name" label="商家名称" width="280"></el-table-column>
          <el-table-column prop="number" label="店铺编码" width="280"></el-table-column>
          <el-table-column prop="shopname" label="店铺名称"></el-table-column>
          <el-table-column prop="type" label="店铺类型"></el-table-column>
        </el-table>
      </el-form>
      <div slot="footer" class="dialog-footer" style="text-align:right">
        <el-button @click="cancels">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 选择供应商 -->

    <el-dialog
      title="供应商"
      :visible.sync="showModel1"
      width="45%"
      height="100%"
      label-width="80px"
      label-position="right"
    >
      <el-form style="text-align:left" label-width="80px" label-position="right">
        <el-row>
          <div style="text-align:center">
            <el-form-item label="供应商编码" style="float:left;margin-left:90px">
              <el-input auto-complete="off" width="20%"></el-input>
            </el-form-item>

            <el-form-item label="供应商名称" style="float:left;margin-left:90px">
              <el-input auto-complete="off" width="20%"></el-input>
            </el-form-item>
          </div>
        </el-row>

        <div style="text-align:center">
          <el-form-item>
            <kt-button
              icon="fa fa-search"
              :label="$t('action.search')"
              type="primary"
              @click="findPage(null)"
            />
            <kt-button label="重置" type="primary" />
          </el-form-item>

          <!-- <div class="tab-container">
            <el-alert :closable="false" style="background-color: #ffffff;color: #ffffff;" title="" type="success" />
            <el-tabs v-model="activeNames" style="margin-top:15px;" type="border-card">
              <el-tab-pane v-for="item in tabMapOptions" :key="item.key" :label="item.label" :name="item.key">
                <keep-alive>
                  <tab-pane v-if="activeNames==item.key" :type="item.key" />
                </keep-alive>
              </el-tab-pane>
            </el-tabs>
          </div>-->
        </div>

        <el-table :data="shopWarehouse" border style="width: 100%" :visible.sync="showTable1">
          <el-table-column prop="checks" type="selection"></el-table-column>
          <el-table-column prop="number" label="供应商编码" width="340"></el-table-column>
          <el-table-column prop="name" label="供应商名称"></el-table-column>
        </el-table>
      </el-form>
      <div slot="footer" class="dialog-footer" style="text-align:right">
        <el-button @click="cancels1">取 消</el-button>
      </div>
    </el-dialog>
  </el-container>
</template>
<script>
import CyTable from "@/views/Core/CyTable";
import KtButton from "@/views/Core/KtButton";
export default {
  components: {
    CyTable,
    KtButton
  },
  data() {
    return {
      activeNames: "0",
      showModel: false,
      showTable: false,
      showModel1: false,
      showTable1: false,
      shopsModel: false,
      shopsTable: false,
      activeName: "activeName",
      tableLog: [
        {
          operatingid: "1909160000172983",
          operator: "merchant",
          operating_time: "2019-10-31 22:55:56	",
          operating: "收货单入库	",
          remark: ""
        },
        {
          operatingid: "1909160000172983",
          operator: "merchant",
          operating_time: "2019-10-31 22:00:02		",
          operating: "确认收货单",
          remark: ""
        },
        {
          operatingid: "1909160000172983",
          operator: "merchant",
          operating_time: "2019-10-31 21:59:57		",
          operating: "更新收货单		",
          remark: ""
        },
        {
          operatingid: "1909160000172983",
          operator: "merchant",
          operating_time: "2019-10-31 21:59:52	",
          operating: "创建收货单		",
          remark: ""
        }
      ],
      tableData: [
        {
          mpCode: "1910300000521981",
          mpName: "育学园补邮费专用链接1元（请联系客服后下单，勿自主拍下！）",
          mpBarcode: "",
          mpMeasureUnit: "",
          shoptype: "包包",
          shopBrand: "",
          mpMeasureUnit: "件",
          purchasenums: "1,000.0000",
          regularnums: "1,000.0000",
          unregularnums: "0.0000",
          correctedquantity: "",
          returnpurchase: "",
          untaxed: "0.909091",
          taxrate: "10.000000%",
          moneytype: "CNY",
          exchangerate: "1",
          purchaseprice: "1.000000	",
          untaxedamount: "909.091000",
          tax: "90.910000",
          amounttax: "1,000.000000",
          receiptmethod: "接受-入库",
          remark: "",
          warehousepurchase: "1,000.000000",
          purchaseno: "CG1910310002187947",
          purchasealone: "1910310002187969",
          asnno: "",
          asnline: "",
          contractnumber: "HT1909220000100067",
          contracttype: "代销合同	",
          attributes: "自采合同"
        }
      ],

      shopTable: [
        {
          checks: "",
          name: "张小二服饰",
          number: "jd_001	",
          shopname: "京东店	",
          type: "线上店铺"
        },
        {
          checks: "",
          name: "张小二服饰",
          number: "tm_001	",
          shopname: "育学园天猫旗舰店（正式）	",
          type: "线上店铺"
        }
      ],

      shopsTable: [
        {
          number: "001",
          name: "张小二服饰",
          type: "自营商家"
        }
      ],

      shopWarehouse: [
        {
          checks: "",
          number: "1912240002546516",
          name: "12312312312313123	"
        },
        {
          checks: "",
          number: "1911290006883258",
          name: "对账人民币经销供应商	"
        },
        {
          checks: "",
          number: "1911290006873624",
          name: "对账美元经销供应商	"
        },
        {
          checks: "",
          number: "1911290006873624",
          name: "对账美元经销供应商	"
        },
        {
          checks: "",
          number: "1910260000105369",
          name: "wuxiancai222	"
        }
      ]
    };
  },
  methods: {
    print: function() {
      this.$message({ message: "打印成功", type: "success" });
    },
    //店铺table
    showStore() {
      this.showModel = true;
      this.showTable = true;
    },
    showWarehouse() {
      this.showModel1 = true;
      this.showTable1 = true;
    },

    //商家table
    showShops() {
      this.shopsModel = true;
      this.shopsTable = true;
    },
    //取消按钮
    cancels: function() {
      this.showModel = false;
      this.showTable = false;
    },
    //取消按钮
    cancels1: function() {
      this.showModel1 = false;
      this.showTable1 = false;
    },
    //取消按钮
    cancels2: function() {
      this.shopsModel = false;
      this.shopsTable = false;
    },
    //导出按钮
    exInfo: function() {
      this.$message({ message: "导出成功", type: "success" });
    },
    //创建退货单
    addOrder: function() {
      this.$router.push("/ReturnDetail");
    }
  },
  watch: {
    activeNames(val) {
      this.$router.push(`${this.$route.path}?tab=${val}`);
    }
  },
  created() {
    // init the default selected tab
    const tab = this.$route.query.tab;
    if (tab) {
      this.activeNames = tab;
    }
  }
};
</script>

<style scoped>
.el-row {
  margin-bottom: 15px;
  &:last-child {
    margin-bottom: 0;
  }
}
.el-col {
  border-radius: 4px;
}
.bg-purple-dark {
  background: #99a9bf;
}
.bg-purple {
  background: #d3dce6;
}
.bg-purple-light {
  background: #e5e9f2;
}
.grid-content {
  border-radius: 4px;
  min-height: 20px;
}
.row-bg {
  padding: 10px 0;
  background-color: #f9fafc;
}
</style>